package com.tr.rentcar.controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.tr.rentcar.common.IDCardValidate;

/**
 * Servlet implementation class ValidateIdebtity
 */
/**
 * 验证身份证
 * @author lenovo
 *
 */
@WebServlet("/validate/idebtity")
public class ValidateIdebtityController extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String uaIdentity=request.getParameter("identity");
		PrintWriter out=response.getWriter();
		out.println(IDCardValidate.validate(uaIdentity));
	}

}
